#!/usr/bin/env python

import sys

def decode(input):
	array = list(input)[::-1]
	prev = "0"
	decoded = ""

	for i in range(1, len(array)):
		current = array[i]

		if current == prev:
			decoded += "1"
		else:
			decoded += "0"

		prev = current

	return decoded[::-1]

if len(sys.argv) == 2:
	print decode(sys.argv[1])
else:
	f = open('./encoded.dat')

	for line in f.readlines():
		decoded = decode(str(line).strip())

		print decoded
